package training;

public class BankAccount {
    private String holderName;
    private double blance;
    private double interestRate;

    public BankAccount() {
    }

    public BankAccount(String holderName, double blance, double interestRate) {
        this.holderName = holderName;
        this.blance = blance;
        this.interestRate = interestRate;
    }

    /**
     * 计算利息
     * @return
     */
    public double calcRate(){
        return this.blance * this.interestRate;
    }
    public String getHolderName() {
        return holderName;
    }

    public void setHolderName(String holderName) {
        this.holderName = holderName;
    }

    public double getBlance() {
        return blance;
    }

    public void setBlance(double blance) {
        this.blance = blance;
    }

    public double getInterestRate() {
        return interestRate;
    }

    public void setInterestRate(double interestRate) {
        this.interestRate = interestRate;
    }
}
